var express = require('express');
var fs = require('fs');
var app = express();
var bodyParser=require('body-parser')
var router=require('./router');//获取导出模块
// 解析 application/json

//
app.use('/public', express.static('./public/'));
app.use('/node_modules', express.static('./node_modules/'));
app.engine('html', require('express-art-template'));
app.use(bodyParser.json()); 
// 解析 application/x-www-form-urlencoded
app.use(bodyParser.urlencoded({extended:false}));
//npm i -S art-template express-art-template模板引擎下载

app.use(router);//导出模块使用

app.listen(8080, () => {
    console.log('8080');
})